﻿@{
    ViewBag.Title = "门店列表";
    Layout = "~/Views/Shared/_adminLayout.cshtml";
    List<Wx_TemplateImageType> typeList = ViewBag.typeList;
}

@model Pagination<Wx_QrcodeSite>

<h2 class="sub-header">门店列表</h2>
<div class="table-responsive">
    <table class="table table-striped table-bordered table-hover table-condensed">
        <thead>
            <tr>
                <th>小程序码</th> 
                <th>图片1</th>
                <th>公司/门店</th>
                <th>地址</th>                
                <th>电话</th>                       
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        @if (!string.IsNullOrEmpty(item.QrcodeImg))
                        {
                            <img src="@Url.Content("~/images/qrcode/site/")@item.QrcodeImg" height="50" />
                        }
                    </td>
                    <td>
                        @if (!string.IsNullOrEmpty(item.CompanyImg1))
                        {
                            <img src="@item.CompanyImg1" height="50" />
                        }
                    </td>
                    <td>
                    @item.Company   
                    </td>
                    <td>
                        @item.Address
                    </td>            
                    <td>
                        @item.Telephone
                    </td>                  
                    <td>
                        @Html.ActionLink("详细", "QrcodeSiteDetail", new { id = @item.Id }, new { Class = "btn btn-default" })                        
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
<nav>
    <ul class="pagination">
        <li>
            @Html.ActionLink("<<", "QroceSiteList", new { page = 0 })
        </li>
        @for (int i = 0; i < Model.TotalPages; i++)
        {
            if (i == Model.PageIndex)
            {
                <li class="active">
                    @Html.ActionLink((i + 1).ToString(), "QroceSiteList", new { page = i })
                </li>
            }
            else
            {
                <li>
                    @Html.ActionLink((i + 1).ToString(), "QroceSiteList", new { page = i })
                </li>
            }
        }
        <li>
            @Html.ActionLink(">>", "QroceSiteList", new { page = Model.TotalPages - 1 > 0 ? Model.TotalPages - 1 : 0 })
        </li>
    </ul>
</nav>


